Wait for crates.io publish propagation#5352
Conversation
| )) | ||
| } | ||
|
|
||
| fn crate_version(&self, crate_name: &str, manifest_map: &HashMap<String, PathBuf>) -> Result<String, String> { |
There was a problem hiding this comment.
nah please pass release_version as a field to CratesRelease like we do for the other targets, and then just use that
There was a problem hiding this comment.
Done in 0c3f301: CratesRelease now stores the CLI/all-target release version and uses that directly for the crates.io visibility wait. I also updated the workflow and docs so the crates target is invoked with the required version argument.
| run: cargo-release release crates --dry-run | ||
| env: | ||
| RELEASE_TAG: ${{ github.event.inputs.release_tag }} | ||
| run: cargo-release release crates "${RELEASE_TAG#v}" --dry-run |
There was a problem hiding this comment.
no. other jobs do cargo-release release cpp ${{ github.event.inputs.release_tag }}. do that.
There was a problem hiding this comment.
Done in 7317f8b: the crates workflow invocation now matches the other targets and passes ${{ github.event.inputs.release_tag }} directly. The crates target strips a leading v only for the crates.io cargo info <crate>@<version> lookup, matching the local normalization pattern used by the C# and C++ targets.
Description of Changes
Stacked on #5325.
This updates the crates.io release target so after each crate publish succeeds, or is detected as already published, the release tool waits until
cargo info <crate>@<version>can resolve that exact version from the registry before continuing to later crates.This prevents dependent crates from being published before crates.io has indexed the just-published dependency version.
API and ABI breaking changes
None.
Expected complexity level and risk
Testing
PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo check -p spacetimedb-releasePATH=/Users/clockworklabs/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH /Users/clockworklabs/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo-fmt --allgit diff --check